<?php /* Smarty version Smarty-3.1.19, created on 2017-11-06 11:33:37
         compiled from "D:\phpStudy\WWW\zhxykaoqin\sdk\theme\admin\default\views\device\edit.html" */ ?>
<?php /*%%SmartyHeaderCode:2076859ffd811b6af78-10334072%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '78bfb991290f8591b50b7b2bf0be142a3aa5103b' => 
    array (
      0 => 'D:\\phpStudy\\WWW\\zhxykaoqin\\sdk\\theme\\admin\\default\\views\\device\\edit.html',
      1 => 1506513459,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2076859ffd811b6af78-10334072',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'row' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.19',
  'unifunc' => 'content_59ffd811bf7994_30859098',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_59ffd811bf7994_30859098')) {function content_59ffd811bf7994_30859098($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('public/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<div class="main-content">
<div class="page-content">
  <div class="page-content-area" style="opacity: 0.8;"> <br>
    <div class="page-header">
      <h1> 设备管理 <small><i class="ace-icon fa fa-angle-double-right"></i> <?php if ($_smarty_tpl->tpl_vars['row']->value['id']) {?>编辑<?php } else { ?>新增<?php }?>设备 </small> </h1>
    </div>
    <div class="row">
      <div class="panel panel-default">
        <div class="panel-body table-responsive">
          <form method="post" class="form-horizontal" role="form" id="submitform" onsubmit="return false">
            <div class="form-group">
              <div class="col-md-6">
                <label class="control-label" for="name">设备</label>
                <input type="text" class="form-control" id="device_id" name="device_id" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['device_id'];?>
">
              </div>
            </div>
            <div class="form-group">
              <div class="col-md-6">
                <label class="control-label" for="name">备注</label>
                <input type="text" class="form-control" id="info" name="info" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['info'];?>
">
              </div>
            </div>
            <div class="form-group">
              <div class="col-md-6">
                <button type="submit" class="btn btn-primary btn-lg btn-submit">提交</button>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
<script>
var isbusy = false;
$(function(){
	$('#submitform').validate({
		focusInvalid: true,
		rules: {
			//title: {
				//required: true
			//}
		}
	});
	$('.btn-submit').click(function(){
		if(!$('#submitform').valid())return false;
		if(isbusy)return false;
		isbusy = true;
		tooltipbox.show('正在执行操作...');
		$.post(location.href, $('#submitform').serialize(), function(res){
		    if(res.code == 1){
				location.href = '<?php echo siteurl("con=admin/device");?>
';
			}
			tooltipbox.show(res.msg);	
			isbusy = false;
		}, 'json').error(function(a, b, c){
			tooltipbox.show('数据或网络错误');
			isbusy = false;
		});
	});
});
</script> 
<?php echo $_smarty_tpl->getSubTemplate ('public/footer.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
 <?php }} ?>
